const express = require('express'),
    userRouter = require('../../../user/server/routers/user.server.router'),
    merchantRouter = require('../../../merchant/server/routers/merchant.server.router');
    orderRouter = require('../../../order/server/routers/order.server.router');
    cartRouter = require('../../../cart/server/routers/cart.server.router');
    userFilter = require('../filter/user.server.filter');

module.exports = function (router) {

    router.get(['/', '/index'], function (req, res) {
        res.redirect('/index.html')
    });
    router.use('/clients', userRouter);
    router.use('/merchants', merchantRouter);
    router.use("/order",userFilter.loginFilter, orderRouter);
    router.use("/cart", cartRouter);
};
